﻿using System;

namespace OmniKits.Windows.Interop
{
    partial class User32
    {
        public static readonly IntPtr HWndTop = new IntPtr(0);
        public static readonly IntPtr HWndBottom = new IntPtr(1);
        public static readonly IntPtr HWndTopmost = new IntPtr(-1);
        public static readonly IntPtr HWndNoTopmost = new IntPtr(-2);

        public const int SWP_NOSIZE = 0x1;
        public const int SWP_NOMOVE = 0x2;
        public const int SWP_NOZORDER = 0x4;
        public const int SWP_NOREDRAW = 0x8;
        public const int SWP_NOACTIVATE = 0x10;
        public const int SWP_FRAMECHANGED = 0x20;  /* The frame changed: send WM_NCCALCSIZE */
        public const int SWP_SHOWWINDOW = 0x40;
        public const int SWP_HIDEWINDOW = 0x80;
        public const int SWP_NOCOPYBITS = 0x100;
        public const int SWP_NOOWNERZORDER = 0x200;  /* Don't do owner Z ordering */
        public const int SWP_NOSENDCHANGING = 0x400;  /* Don't send WM_WINDOWPOSCHANGING */

        public const int SWP_DRAWFRAME = SWP_FRAMECHANGED;
        public const int SWP_NOREPOSITION = SWP_NOOWNERZORDER;

        public const int SWP_DEFERERASE = 0x2000;
        public const int SWP_ASYNCWINDOWPOS = 0x4000;
    }
}

namespace OmniKits.Windows.Interop
{
    using static User32;

    [Flags]
    public enum SetWindowPosFlags : int
    {
        None = 0,
        NoSize = SWP_NOSIZE,
        NoMove = SWP_NOMOVE,
        NoZOrder = SWP_NOZORDER,
        NoRedraw = SWP_NOREDRAW,
        NoActivate = SWP_NOACTIVATE,
        DrawFrame = SWP_DRAWFRAME,
        FrameChanged = SWP_FRAMECHANGED,
        ShowWindow = SWP_SHOWWINDOW,
        HideWindow = SWP_HIDEWINDOW,
        NoCopyBits = SWP_NOCOPYBITS,
        NoOwnerZOrder = SWP_NOOWNERZORDER,
        NoReposition = SWP_NOREPOSITION,
        NoSendChanging = SWP_NOSENDCHANGING,
        DeferErase = SWP_DEFERERASE,
        AsyncWindowPos = SWP_ASYNCWINDOWPOS,
    }
}
